
var JieColumn = function(alFormatTem){
	
	EventListener.call(this);
	
	this.id = Util.trim(alFormatTem.id);
	
	this.title = alFormatTem.title;
	this.cells = new Array();//单元格集合

	this.dateType = Util.trim(alFormatTem.dateType);//数据类型，text\boolen\combo\date
	this.isEdit = alFormatTem.isEdit;//是否可编辑
	this.isFixed = false;
	this.isShow = alFormatTem.isShow;//是否显示
	
	this.defaultValue = alFormatTem.defaultValue?alFormatTem.defaultValue:"";
	this.iWidth = Util.getLengthNumber(alFormatTem.width);
	
	this.emptyCheck = alFormatTem.emptyCheck;
	this.formatStr = alFormatTem.formatStr;//格式字符串
	
	this.isKey = alFormatTem.isKey;//是否主键列
	this.aligns = alFormatTem.aligns?alFormatTem.aligns:Properties.grid.cell["text-align"];//对齐方式（默认left）
	
	this.headBgColor = alFormatTem.headBgColor;//标题栏背景色
	this.headForeColor = alFormatTem.headForeColor;//标题栏文字颜色
	this.headFontFamily = alFormatTem.dateFontFamily?alFormatTem.dateFontFamily:Properties.grid.cell["font-family"];//标题栏字体
	this.headFontSize = alFormatTem.headFontSize?alFormatTem.headFontSize:Properties.grid.cell["font-size"];//标题栏字体
	
	this.dateBgColor = alFormatTem.dateBgColor;//数据区域背景色
	this.dateForeColor = alFormatTem.dateForeColor;//数据区域文字颜色
	this.dateFontFamily = alFormatTem.dateFontFamily?alFormatTem.dateFontFamily:Properties.grid.cell["font-family"];//数据区域字体
	this.dataFontSize = alFormatTem.dataFontSize?alFormatTem.dataFontSize:Properties.grid.cell["font-size"];//标题栏字体
	
	this.oList = {};
};

JieColumn.prototype = EventListener.prototype;

JieColumn.prototype.appendCell = function(aoCell){
	for(var sKey in this.Listeners){
		EventRoute.regiditEvent(aoCell.element, sKey);
	}
	aoCell.setValue(this.defaultValue);
	aoCell.setBgColor(this.dateBgColor);
//	alert(this.dateForeColor);
	aoCell.setForeColor(this.dateForeColor);
	aoCell.setFontFamily(this.dateFontFamily);
	aoCell.setFontSize(Properties.grid.cell["font-size"]);
	aoCell.setAlign(this.aligns);
	aoCell.setBorderStyle("inset");
	
	this.cells.push(aoCell);
};
JieColumn.prototype.regCombo = function(oJSONData){
	if(this.dateType == "list") this.oList = oJSONData;
};
